1. Field of the Invention
The disclosed embodiments of the present invention relate to image correction, and more particularly, to an image correction method using an approximately non-linear regression approach to correct the captured images and a related image correction circuit.
2. Description of the Prior Art
When a fish-eye lens or a wide-angle lens is used to capture images, although the captured images have a very wide-angle view, a barrel-shaped distortion often happens as shown in FIG. 1A, which will affect the image quality. In addition, when using a long lens or a telephoto lens to capture images, although it can capture images in the long distance, a pillow-shaped distortion often happens as shown in FIG. 1B.
Therefore, in order to address this problem, this kind of images will be processed with digital image correction operations such that the distorted images may be recovered to the original state. Generally speaking, digital image correction operations may be roughly divided into two categories. The first type uses de-warping transformation mathematical models to perform image correction operations. This kind of correction method inducts a mapping mechanism from a three-dimensional (3D) space to a two-dimensional (2D) space according to optics and lens characteristics, so as to restore images with barrel-shaped distortion to their original states. However, this kind of method has some disadvantages. First, a viewing angle is compromised, especially horizontal field of view (FOV). The wider is the viewing angle of the lens, the more horizontal FOV is lost after the image correction operations. If it is a wide-angle lens with about 170-degree viewing angle, the wide-angle lens may lose approximately 30-degree viewing angle after the image correction operations. Although the remaining viewing angle is still wider than a normal lens (a normal lens generally has a viewing angle which is roughly 50-60 degrees), it significantly cripples capabilities of the wide-angle lens and somehow loses the “meaning” of using the wide-angle lens. In addition, although it may increase the viewing angle when performing image correction operations by a technique of shrinking an image, it will cause the corrected image to be much smaller than the original image. In addition, using such mathematical models for image correction may often cause the image to be overly stretched around the rims of the image, which may seem unnatural. Besides, the wider is the viewing angle, the more significant the stretch is. Therefore this method is unsuitable for super wide-angle lens. Moreover, this kind of correction method has high complexity calculations, which involves calculations of many triangular functions and their inverse functions, and will greatly increase difficulties in hardware implementation. Even if the mapping mechanism is pre-computed by software, it will cause an unnatural freeze image in the beginning. Finally, this method is only practical to address the barrel-shaped distortion. If the image correction is to deal with a pillow-shaped distortion caused by a telephoto lens, another mathematical model must be inducted, and the calculation and the physical meaning will be accordingly different. As a result, this method is not generalized enough.
The second type uses a known input image and an output image derived from capturing the known input image to calculate coefficients of a polynomial used to perform image correction operations. That is, this method uses a lot pre-configured coordinates to calculate correspondences of the known input image and the output image, in order to obtain each coefficient of a high-order polynomial for using the polynomial to perform the image correction operations on the images. However, this method has some disadvantages, either. First, the coordinates of the input image and the corresponding coordinates of the captured output image have to be acquired manually and then substituted into the polynomial. It is extremely complicated to obtain these coefficients, and there are quite a lot coefficients needed to be obtained, leading to many inconveniences in performing image correction operations. If the lens is changed, these steps have to be repeated again. In addition, when applied to a super wide-angle lens, this method cannot achieve a very good effect. The reason is that when the horizontal FOV is near 170 degree, it is very hard for the known image to cover the whole view, and the calculation errors would be huge. Besides, this method cannot guarantee to hold the horizontal FOV, which cripples capabilities of the wide-angle lens and loses the “meaning” of using the wide-angle lens as well.